Adwaita: widget edge for switch and progressbars
authorLapo Calamandrei <calamandrei@gmail.com>
Fri, 18 Jul 2014 21:30:16 +0000 (23:30 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Fri, 18 Jul 2014 21:30:16 +0000 (23:30 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 54720534411c8de0e14a685ac138e77cccf23e46..e9b4036309636f14afb9248cfa634ed8819bfa6d 100644 (file)
@@ -1443,6 +1443,9 @@ GtkSwitch {
   -GtkSwitch-slider-width: 47px;
   font: bold condensed 9;
   outline-offset: -4px;
+  box-shadow: inset 0 1px transparentize(black, 0.9), // needs to be set here
+              $widget_edge;                           // otherwise it gets
+                                                      // clipped
   &.trough {
     // similar to the .scale
     border-width: 1px;
@@ -1450,7 +1453,6 @@ GtkSwitch {
     border-radius: 3px;
     border-color: $borders_color;
     background-color: mix($bg_color,$borders_color,60%);
-    box-shadow: inset 0 1px transparentize(black, 0.9); /*outset not working*/
     text-shadow: 0 1px transparentize(black, 0.9);
     &:active {
       color: white;
@@ -1805,6 +1807,9 @@ GtkProgressBar {
     padding: 0;
     font-size: 83%;
     color: transparentize($fg_color, 0.6);
+    box-shadow: inset 1px 1px transparentize(black, 0.9), // needs to be set
+                $widget_edge;                             // here ot it gets
+                                                          // clipped
     &:backdrop {
       color: $backdrop_insensitive_color;
     }
@@ -1817,11 +1822,8 @@ GtkProgressBar {
   border-radius: 3px;
   border-color: $selected_borders_color;
   background-color: $selected_bg_color;
-  // I really prefer these flat w/o this shadow - Lapo
-  box-shadow: inset 0 1px 0 transparentize($borders_edge,0.8);
-  &.vertical {
-    box-shadow: inset 1px 0 0 transparentize($borders_edge,0.8);
-  }
+  box-shadow: none;
+//  box-shadow: inset 1px 1px transparentize($borders_edge,0.8);
   &:backdrop {
     border-color: $selected_bg_color;
     background-color: $selected_bg_color;
@@ -1843,8 +1845,8 @@ GtkProgressBar.trough {
   border-radius: 3px;
   border-color: $borders_color;
   background-color: mix($borders_color,$bg_color, 35%);
-  box-shadow: inset 1px 1px transparentize(black, 0.9),
-              $widget_edge;
+//  box-shadow: inset 1px 1px transparentize(black, 0.9),
+//              $widget_edge;
   &:backdrop{
     border-color: $backdrop_borders_color;
     background-color: mix($backdrop_borders_color,$backdrop_bg_color, 35%);
index f632a52b7364840910f11eb34d798d239a1a2cce..e38d02ae9ae0216477cc6ce0ff21de925ef561d1 100644 (file)
@@ -1547,15 +1547,14 @@ GtkTreeView.view.progressbar {
 GtkSwitch {
   -GtkSwitch-slider-width: 47px;
   font: bold condensed 9;
-  outline-offset: -4px; }
+  outline-offset: -4px;
+  box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
   GtkSwitch.trough {
     border-width: 1px;
     border-style: solid;
     border-radius: 3px;
     border-color: #1c1f1f;
     background-color: #2d3232;
-    box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
-    /*outset not working*/
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
       color: white;
@@ -2326,7 +2325,8 @@ GtkCheckButton.text-button, GtkRadioButton.text-button {
 GtkProgressBar {
   padding: 0;
   font-size: 83%;
-  color: rgba(238, 238, 236, 0.4); }
+  color: rgba(238, 238, 236, 0.4);
+  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
   GtkProgressBar:backdrop {
     color: #454c4c; }
 
@@ -2336,9 +2336,7 @@ GtkProgressBar {
   border-radius: 3px;
   border-color: #0f2b48;
   background-color: #215d9c;
-  box-shadow: inset 0 1px 0 rgba(238, 238, 236, 0); }
-  .progressbar.vertical {
-    box-shadow: inset 1px 0 0 rgba(238, 238, 236, 0); }
+  box-shadow: none; }
   .progressbar:backdrop {
     border-color: #215d9c;
     background-color: #215d9c;
@@ -2355,8 +2353,7 @@ GtkProgressBar.trough {
   border-style: solid;
   border-radius: 3px;
   border-color: #1c1f1f;
-  background-color: #2e3333;
-  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.1), 0 1px rgba(238, 238, 236, 0.1); }
+  background-color: #2e3333; }
   GtkProgressBar.trough:backdrop {
     border-color: #1e2222;
     background-color: #2f3434;
index 31348cd4cdde1491587fd84290c9c21ffdeab8b4..c71989bc0613d93a44740b173120fe60f0e984de 100644 (file)
@@ -1540,15 +1540,14 @@ GtkTreeView.view.progressbar {
 GtkSwitch {
   -GtkSwitch-slider-width: 47px;
   font: bold condensed 9;
-  outline-offset: -4px; }
+  outline-offset: -4px;
+  box-shadow: inset 0 1px rgba(0, 0, 0, 0.1), 0 1px white; }
   GtkSwitch.trough {
     border-width: 1px;
     border-style: solid;
     border-radius: 3px;
     border-color: #a1a1a1;
     background-color: #cecece;
-    box-shadow: inset 0 1px rgba(0, 0, 0, 0.1);
-    /*outset not working*/
     text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
     GtkSwitch.trough:active {
       color: white;
@@ -2317,7 +2316,8 @@ GtkCheckButton.text-button, GtkRadioButton.text-button {
 GtkProgressBar {
   padding: 0;
   font-size: 83%;
-  color: rgba(46, 52, 54, 0.4); }
+  color: rgba(46, 52, 54, 0.4);
+  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.1), 0 1px white; }
   GtkProgressBar:backdrop {
     color: #c7c7c7; }
 
@@ -2327,9 +2327,7 @@ GtkProgressBar {
   border-radius: 3px;
   border-color: #184472;
   background-color: #4a90d9;
-  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
-  .progressbar.vertical {
-    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.2); }
+  box-shadow: none; }
   .progressbar:backdrop {
     border-color: #4a90d9;
     background-color: #4a90d9;
@@ -2346,8 +2344,7 @@ GtkProgressBar.trough {
   border-style: solid;
   border-radius: 3px;
   border-color: #a1a1a1;
-  background-color: #d2d2d2;
-  box-shadow: inset 1px 1px rgba(0, 0, 0, 0.1), 0 1px white; }
+  background-color: #d2d2d2; }
   GtkProgressBar.trough:backdrop {
     border-color: #a8a8a8;
     background-color: #d4d4d4;